// CubeData.h
// Richard S. Wright Jr.
/* A simple cube drawn as 12 triangles using indexed vertex arrays. The cube includes
   vertex positions (vCubeVerts), normals (vCubeNormals), and texture coordinates
   (vCubeTextureCoordinates). Finally an array of unsigned integers (vCubeIndexes)
   is provided.

   This is not the best example of how indexed vertex arrays can save data. In fact,
   since the cube is pretty much nothing but sharp corners, there is actually no
   data reuse what so ever. It does however represent a simple and easy to follow
   (I hope) example of how to use an indexed vertex array. More complex surfaces
   with more shared vertex data is left as an exercise for the reader ;-)
*/

const float fCubeSize = 0.1f;
const int nNumVerts = 36;

float	vCubeVerts[nNumVerts * 3] = { // Front face
							-fCubeSize, -fCubeSize, fCubeSize,		// BL
							fCubeSize, -fCubeSize, fCubeSize,		// BR
							fCubeSize, fCubeSize, fCubeSize,		// UR

							-fCubeSize, -fCubeSize, fCubeSize,		// BL
							fCubeSize, fCubeSize, fCubeSize,		// UR
							-fCubeSize, fCubeSize, fCubeSize,		// UL

							// Back face
							fCubeSize, -fCubeSize, -fCubeSize,
							-fCubeSize, -fCubeSize, -fCubeSize,
							-fCubeSize, fCubeSize, -fCubeSize,

							fCubeSize, -fCubeSize, -fCubeSize,
							-fCubeSize, fCubeSize, -fCubeSize,
							fCubeSize, fCubeSize, -fCubeSize,

							// Top Face
							-fCubeSize, fCubeSize, fCubeSize,
							fCubeSize, fCubeSize, fCubeSize,
							fCubeSize, fCubeSize, -fCubeSize,

							-fCubeSize, fCubeSize, fCubeSize,
							fCubeSize, fCubeSize, -fCubeSize,
							-fCubeSize, fCubeSize, -fCubeSize,

							// Bottom Face
							fCubeSize, -fCubeSize, fCubeSize,
							-fCubeSize, -fCubeSize, fCubeSize,
							-fCubeSize, -fCubeSize, -fCubeSize,

							fCubeSize, -fCubeSize, fCubeSize,
							-fCubeSize, -fCubeSize, -fCubeSize,
							fCubeSize, -fCubeSize, -fCubeSize,

							// Left Face
							-fCubeSize, -fCubeSize, -fCubeSize,
							-fCubeSize, -fCubeSize, fCubeSize,
							-fCubeSize, fCubeSize, fCubeSize,

							-fCubeSize, -fCubeSize, -fCubeSize,
							-fCubeSize, fCubeSize, fCubeSize,
							-fCubeSize, fCubeSize, -fCubeSize,

							// Right face
							fCubeSize, -fCubeSize, fCubeSize,
							fCubeSize, -fCubeSize, -fCubeSize,
							fCubeSize, fCubeSize, -fCubeSize,

							fCubeSize, -fCubeSize, fCubeSize,
							fCubeSize, fCubeSize, -fCubeSize,
							fCubeSize, fCubeSize, fCubeSize,
							};

float vCubeNormals[nNumVerts * 3] = { 
							   0.0f, 0.0f, 1.0f,		// Front face, all pointing positive Z
							   0.0f, 0.0f, 1.0f,
							   0.0f, 0.0f, 1.0f,

							   0.0f, 0.0f, 1.0f,
							   0.0f, 0.0f, 1.0f,
							   0.0f, 0.0f, 1.0f,

							   0.0f, 0.0f, -1.0f,		// Back face, all pointing negative Z
							   0.0f, 0.0f, -1.0f,
							   0.0f, 0.0f, -1.0f,

							   0.0f, 0.0f, -1.0f,
							   0.0f, 0.0f, -1.0f,
							   0.0f, 0.0f, -1.0f,

							   0.0f, 1.0f, 0.0f,		// Top, all pointing up, positive Y
							   0.0f, 1.0f, 0.0f,
							   0.0f, 1.0f, 0.0f,
							   0.0f, 1.0f, 0.0f,
							   0.0f, 1.0f, 0.0f,
							   0.0f, 1.0f, 0.0f,

							   0.0f, -1.0f, 0.0f,		// Bottom, all pointing down, negative Y
							   0.0f, -1.0f, 0.0f,
							   0.0f, -1.0f, 0.0f,
							   0.0f, -1.0f, 0.0f,
							   0.0f, -1.0f, 0.0f,
							   0.0f, -1.0f, 0.0f,

							   -1.0f, 0.0f, 0.0f,		// Left side, all pointing left
							   -1.0f, 0.0f, 0.0f,
							   -1.0f, 0.0f, 0.0f,
								-1.0f, 0.0f, 0.0f,
								-1.0f, 0.0f, 0.0f,
								-1.0f, 0.0f, 0.0f,

								1.0f, 0.0f, 0.0f,		// Right side, all pointing right
								1.0f, 0.0f, 0.0f,
								1.0f, 0.0f, 0.0f,
								1.0f, 0.0f, 0.0f,
								1.0f, 0.0f, 0.0f,
								1.0f, 0.0f, 0.0f,

							};


float vCubeTextureCoordinates[nNumVerts * 3] = { // Just the same set of texture coordinates
										  // over and over
										0.0f, 0.0f,
										1.0f, 0.0f,
										1.0f, 1.0f,

										0.0f, 0.0f,
										1.0f, 1.0f,
										0.0f, 1.0f, 
									
										0.0f, 0.0f,
										1.0f, 0.0f,
										1.0f, 1.0f,

										0.0f, 0.0f,
										1.0f, 1.0f,
										0.0f, 1.0f, 

										0.0f, 0.0f,
										1.0f, 0.0f,
										1.0f, 1.0f,

										0.0f, 0.0f,
										1.0f, 1.0f,
										0.0f, 1.0f, 

										0.0f, 0.0f,
										1.0f, 0.0f,
										1.0f, 1.0f,

										0.0f, 0.0f,
										1.0f, 1.0f,
										0.0f, 1.0f, 

		     							0.0f, 0.0f,
										1.0f, 0.0f,
										1.0f, 1.0f,

										0.0f, 0.0f,
										1.0f, 1.0f,
										0.0f, 1.0f, 

										0.0f, 0.0f,
										1.0f, 0.0f,
										1.0f, 1.0f,

										0.0f, 0.0f,
										1.0f, 1.0f,
										0.0f, 1.0f, 


};

float vCubeTangents[nNumVerts * 3];



GLuint vCubeIndexes [nNumVerts] = {  
	                        0, 1, 2, 3, 4, 5,
							6, 7, 8, 9, 10, 11,
							12, 13, 14, 15, 16, 17,
							18, 19, 20, 21, 22, 23,
							24, 25, 26, 27, 28, 29,
							30, 31, 32, 33, 34, 35,
						};
